﻿using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Fluent;
using NLog;
using SPCAM.Plugin;
using SPCAM.Servers;
using SPCAM.ViewModels;

namespace SPCAM
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : RibbonWindow
    {
        public static MainWindow Current { get; private set; }
        private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();
        private MainViewModel dataContext;
        public MainWindow()
        {
            InitializeComponent();
           
            DataContext = dataContext =new MainViewModel( Docking.scad);
            Loaded += MainWindow_Loaded;
            Current = this;
            Server.Instance.MainWindow = this;
          
        }

        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            Docking.scad.SpCad_Loaded(sender,e);
            PluginManager.Instance.LoadPlugin();
        }
    }
}